package com.chatroom.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @author 计算机系 ITAEM 纱雾休比我老婆
 * @Description webSocket配置类
 * @date 2022/8/9 11:10
 */
@Configuration
public class WebSocketConfig {

    /**
     * 注入ServerEndpointExporter的bean对象，自动注册使用了@ServerEndpoint()的bean
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
       return new ServerEndpointExporter();
    }
}
